/**
 * All rights Reserved, Designed By 林溪
 * Copyright:    Copyright(C) 2016-2020
 * Company       溪云阁 .
 */

package com.boots.easypoi;

import java.io.Serializable;
import java.text.NumberFormat;
import java.util.Date;

import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Getter;
import lombok.Setter;

/**
 * 用户信息
 * @author：溪云阁
 * @date：2020年5月29日
 */
public class User implements Serializable {

    // 数字格式化
    private NumberFormat nf = NumberFormat.getNumberInstance();

    private static final long serialVersionUID = 1L;

    @Excel(name = "用户id", orderNum = "0", width = 15)
    @Setter
    @Getter
    private long userId;

    @Excel(name = "性别", orderNum = "1", width = 15, replace = { "男_1", "女_2" }, suffix = "孩")
    @Setter
    @Getter
    private int sex;

    @Excel(name = "金钱", orderNum = "2", width = 15)
    @Setter
    private double money;

    public String getMoney() {
        return nf.format(money);
    }

    @Excel(name = "用户信息", orderNum = "3", width = 15)
    @Setter
    @Getter
    private String userName;

    @Excel(name = "价格", orderNum = "4", width = 15)
    @Setter
    @Getter
    private float price;

    @Excel(name = "时间", orderNum = "5", width = 15, format = "yyyy-MM-dd")
    @Setter
    @Getter
    private Date now;

}
